import eventEmitter from './eventEmitter';
const { ipcMain } = require('electron');
ipcMain.on('webMsg', (e, data: { type: string; data: any }) => {
  switch (data.type) {
    case 'startRecord':
      eventEmitter.emit('startRecord');
      console.log('开始录制');
      break;
    case 'pauseRecord':
      eventEmitter.emit('pauseRecord');
      console.log('暂停录制');
      break;
  }
});
